

//
// Created by gastonfeng on 2022/8/14.
//
#include "core_debug.h"

char *getTaskName();

void __assert_func(int err_num, char *fname, int line_num, const char *foo) {
#ifdef USE_FREERTOS
    vTaskSuspendAll();
    core_debug("assertion %s failed: file %s ,line %s function: %s ,thread %s", foo, err_num, line_num, fname,
               getTaskName());
#else
    core_debug("assertion %s failed: file %s ,line %s function: %s ", foo, err_num, line_num, fname);
#endif
}

